import http from '@/utils/http';

/**
 * 添加收货地址
 */
export const postMemberAddress = (data) => {
    return http({
        url: '/member/address',
        method: "post",
        data
    })
}

/**
 * 获取收货地址列表
 */
export const getMemberAddress = () => {
    return http({
        url:'/member/address'
    })
}

/**
 * 获取地址详情数据
 */
export const getMemberAddressDetail = (id) => {
    return http({
        url:`/member/address/${id}`
    })
}

/**
 * 修改地址数据
 */
export const putMemberAddress = (id,data) => {
    return http({
        url: `/member/address/${id}`,
        method: 'put',
        data
   })
}

/**
 * 删除收货地址
 */
export const deleteMemberAddress = (id) => {
    return http({
        url: `/member/address/${id}`,
        method:"delete"
    })
}